package umacis.lwuitcomponent.property.controller;
import java.util.Hashtable;



import com.sun.lwuit.Component;
import com.sun.lwuit.Image;


public class PropertyAssigner  {
	private static PropertyAssigner instance = new PropertyAssigner();

//	public PropertyGetterSetter setter[] = new PropertyGetterSetter[NUMBER_OF_PROPERTIES]; //[NUMBER_OF_PROPERTIES];    // = new Vector();
//	
//	public PropertyAssigner() {
//		fillSetters();
//	}
//	
//	public static PropertyAssigner getInstance() {
//		return instance;
//	}
//	
//	public Property set(Hashtable properties, int property, int parameter) {
//		Property propertyObject = new Property(property, parameter);
//		properties.put(new Integer(property),propertyObject);
//		return propertyObject;
//	}
//	
//	public void set(Component cmp, Hashtable properties, int property, int integer) {
//		set(properties, property, integer).applyParameters(cmp);
//	}
//	
	
	private void fillSetters() {
		
//		setter[STYLE_bgColor] =  new PropertyController() { public void set(Component cmp, Parameters parameters) {
//			((Component)cmp).getStyle().setBgColor(parameters.integer); 
////			if (cmp.getClass().isAssignableFrom(Container.class)) Log.p("Container");
////			if (cmp.getClass().isAssignableFrom(Component.class)) Log.p("Component");
////			if (cmp.getClass().isAssignableFrom(Button.class)) Log.p("Button");
////			if (cmp.getClass().isAssignableFrom(Label.class)) Log.p("Label");
////			Log.p("trying instanceof");
////			if (cmp instanceof Container) Log.p("Container");
////			if (cmp instanceof Component) Log.p("Component");
////			if (cmp instanceof Button) Log.p("Button");
////			if (cmp instanceof Label) Log.p("Label");
//			//((Component)cmp).setScrollable(true);
//			//Log.p(cmp.getClass().getName());
//		} };;
		//filling up the rest with valid setters.. empty though
//		for (int i = STYLE_bgColor+1; i < NUMBER_OF_PROPERTIES; i++) setter[i] = new PropertyController() {

//			public void set(Component cmp, Parameters parameters) {
//				System.out.println("Still to be implemented..");
//				
//			}};
//	}
	
	}
	
		
}







